Mitigating and Investigating Malicious Activity on the System

1. Identify Unauthorized or Suspicious Accounts

Command Used:

cat /etc/passwd | grep "/bin/bash"

Purpose:

Action:

2. Inspect User Command History

Command Used:

history

Purpose:

Action:

3. Scan for Open Ports and Services

Command Used:

nmap 127.0.0.1

Purpose:

Action:

4. Monitor Active Users and Processes

Command Used:

w

Purpose:

Action:

5. Review Cron Jobs for Persistence

Command to List Cron Jobs:

crontab -l

or system-wide:

cat /etc/crontab

Purpose:

Action:

Summary of Actions Taken

  1. Account Removal:

  2. Script Cleanup:

  3. Port Investigation:

  4. Session Termination:

  5. Cron Job Audit:

Key Takeaways